package com.sg.model.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sg.framework.common.annotations.LikeFlag;
import com.sg.framework.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.util.Date;

/**
 * 主表，有小版本（主表主体只能创建一个版本），表的类型（公共基础）
 *
 * @author xxx
 */
@Data
@Accessors(chain = true)
@TableName("oms_conf_item") //2-3-02 配置项表
public class OmsConfItem extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;


    /**
     * 配置项ID
     */
    @TableId(value = "conf_item_id", type = IdType.ASSIGN_UUID)
    @NotNull(message = "confItemId不能为空")
    private String confItemId;
    /**
     * 配置项标识
     */
    @TableField(value = "conf_item_code")
    @NotNull(message = "配置项标识不能为空")
    @Schema(description = "配置项标识")
    private String confItemCode;
    /**
     * 配置项名称
     */
    @TableField(value = "conf_item_name")
    @NotNull(message = "配置项名称不能为空")
    @Schema(description = "配置项名称")
    private String confItemName;
    /**
     * 配置项简称
     */
    @TableField(value = "short_name")
    @NotNull(message = "配置项简称不能为空")
    @Schema(description = "配置项简称")
    @LikeFlag(likeType = "LIKE")
    private String shortName;
    /**
     * 配置项描述
     */
    @TableField(value = "conf_item_des")
    @Schema(description = "配置项描述")
    private String confItemDes;
    /**
     * 是否单一结果 TRUE:是 FALSE:否
     */
    @TableField(value = "is_single_result")
    @NotNull(message = "是否单一结果不能为空")
    @Schema(description = "是否单一结果")
    private String isSingleResult;
    /**
     * 适用方案类型 BASE_APP:基础应用 CORE_APP:核心应用 ENHANCE_APP:增强应用 PLUG_IN_APP:插件应用 PLATFORM_APP:平台应用
     */
    @TableField(value = "apply_type_code")
    @NotNull(message = "适用方案类型不能为空")
    @Schema(description = "适用方案类型")
    private String applyTypeCode;
    /**
     * 选项类型 RADIO:单选型 MULTIPLE:多选型 TEXT:填空型
     */
    @TableField(value = "conf_item_category")
    @NotNull(message = "选项类型不能为空")
    @Schema(description = "选项类型")
    private String confItemCategory;
    /**
     * 归属业务应用标识
     */
    @TableField(value = "biz_app_code")
    @NotNull(message = "归属业务应用标识不能为空")
    @Schema(description = "归属业务应用标识")
    private String bizAppCode;
    /**
     * 是否用户可见 TRUE:是 FALSE:否
     */
    @TableField(value = "is_visible")
    @Schema(description = "是否用户可见")
    private String isVisible;
    /**
     * 是否允许定制 TRUE:是 FALSE:否
     */
    @TableField(value = "is_open_custom_conf")
    @NotNull(message = "是否允许定制不能为空")
    @Schema(description = "是否允许定制")
    private String isOpenCustomConf;
    /**
     * 归属业务场景标识
     */
    @TableField(value = "biz_scene_code")
    @NotNull(message = "归属业务场景标识不能为空")
    @Schema(description = "归属业务场景标识")
    private String bizSceneCode;
    /**
     * 是否开关 TRUE:是 FALSE:否
     */
    @TableField(value = "is_switch")
    @Schema(description = "是否开关")
    private String isSwitch;
    /**
     * 是否商业参数 TRUE:是 FALSE:否
     */
    @TableField(value = "is_business")
    @NotNull(message = "是否商业参数不能为空")
    @Schema(description = "是否商业参数")
    private String isBusiness;
    /**
     * 是否存档 TRUE:是 FALSE:否
     */
    @TableField(value = "is_archive")
    @NotNull(message = "是否存档不能为空")
    @Schema(description = "是否存档")
    private String isArchive;
    /**
     * 结果是否开启扩展答案 TRUE:是 FALSE:否
     */
    @TableField(value = "is_allow_update_answer")
    @NotNull(message = "结果是否开启扩展答案不能为空")
    @Schema(description = "结果是否开启扩展答案")
    private String isAllowUpdateAnswer;
    /**
     * 临时自动锁定 TRUE:是 FALSE:否
     */
    @TableField(value = "is_temporary_lock")
    @NotNull(message = "临时自动锁定不能为空")
    @Schema(description = "临时自动锁定")
    private String isTemporaryLock;
    /**
     * 主体生命周期 CURRENTLY_VALID:当前有效 EDITING:正在编辑 ARCHIVING:历史存档
     */
    @TableField(value = "subject_life_cycle")
    @NotNull(message = "主体生命周期不能为空")
    @Schema(description = "主体生命周期")
    private String subjectLifeCycle;
    /**
     * 操作人就职记录ID
     */
    @TableField(value = "operation_induction_id")
    @NotNull(message = "操作人就职记录ID不能为空")
    @Schema(description = "操作人就职记录ID")
    private String operationInductionId;
    /**
     * 创建人就职记录ID
     */
    @TableField(value = "create_induction_id")
    @NotNull(message = "创建人就职记录ID不能为空")
    @Schema(description = "创建人就职记录ID")
    private String createInductionId;
    /**
     * 发布人就职记录ID
     */
    @TableField(value = "release_induction_id")
    @Schema(description = "发布人就职记录ID")
    private String releaseInductionId;
    /**
     * 存档人就职记录ID
     */
    @TableField(value = "archive_induction_id")
    @Schema(description = "存档人就职记录ID")
    private String archiveInductionId;
    /**
     * 操作时间
     */
    @TableField(value = "operate_time")
    @NotNull(message = "操作时间不能为空")
    @Schema(description = "操作时间")
    private Date operateTime;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @NotNull(message = "创建时间不能为空")
    @Schema(description = "创建时间")
    private Date createTime;
    /**
     * 发布时间
     */
    @TableField(value = "release_time")
    @Schema(description = "发布时间")
    private Date releaseTime;
    /**
     * 存档时间
     */
    @TableField(value = "archive_time")
    @Schema(description = "存档时间")
    private Date archiveTime;
    /**
     * 是否作废 TRUE:是 FALSE:否
     */
    @TableField(value = "is_valid")
    @NotNull(message = "是否作废不能为空")
    @Schema(description = "是否作废")
    private String isValid;
    /**
     * 创建于空间ID
     */
    @TableField(value = "space_id")
    @NotNull(message = "创建于空间ID不能为空")
    @Schema(description = "创建于空间ID")
    private String spaceId;
    /**
     * 创建于联盟应用ID
     */
    @TableField(value = "app_id")
    @NotNull(message = "创建于联盟应用ID不能为空")
    @Schema(description = "创建于联盟应用ID")
    private String appId;
}
